<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <!-- keyup会在按下键盘时就触发，不想按下就触发，
            就可以用键盘的别称来指定当按下某个特定的键时去触发 -->
        <input type="text" @keyup="handlekeyUp">
        <input type="text" @keyup.enter="handlekeyUp">
        <input type="text" @keyup.13="handlekeyUp">
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        let vm=new Vue({
            el:"#app",
            data:{
                msg:"/(ㄒoㄒ)/~~",

            },
            methods:{
                handlekeyUp:function(e){
                    console.log(e.key);
                }
            }




        })







    </script>

</body>
</html>